/* 全局样式重置 - 股票软件风格 */
.App {
  text-align: left;
  background-color: #0a0e1b;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Ant Design 主题定制 */
.ant-layout {
  background: #0a0e1b !important;
}

.ant-layout-content {
  background: #0a0e1b !important;
}

.ant-card {
  background: #1a1a1a !important;
  border: 1px solid #333 !important;
  border-radius: 4px !important;
}

.ant-card-head {
  background: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
  color: #fff !important;
}

.ant-card-head-title {
  color: #fff !important;
  font-weight: 500 !important;
}

.ant-card-body {
  background: #1a1a1a !important;
  color: #fff !important;
}

/* 表单控件样式 */
.ant-input,
.ant-input-number,
.ant-select-selector,
.ant-picker {
  background-color: #2a2a2a !important;
  border: 1px solid #555 !important;
  color: #fff !important;
}

.ant-input::placeholder,
.ant-input-number::placeholder {
  color: #888 !important;
}

.ant-input:focus,
.ant-input-number:focus,
.ant-select-selector:focus,
.ant-picker:focus {
  border-color: #00da3c !important;
  box-shadow: 0 0 0 2px rgba(0, 218, 60, 0.2) !important;
}

.ant-select-dropdown {
  background-color: #1a1a1a !important;
  border: 1px solid #333 !important;
}

.ant-select-item {
  color: #fff !important;
}

.ant-select-item-option-selected {
  background-color: #2a2a2a !important;
  color: #00da3c !important;
}

.ant-select-item-option:hover {
  background-color: #333 !important;
}

/* 日期选择器 */
.ant-picker-panel-container {
  background-color: #1a1a1a !important;
}

.ant-picker-panel {
  background-color: #1a1a1a !important;
  border: 1px solid #333 !important;
}

.ant-picker-header,
.ant-picker-body,
.ant-picker-footer {
  background-color: #1a1a1a !important;
}

.ant-picker-cell {
  color: #fff !important;
}

.ant-picker-cell:hover .ant-picker-cell-inner {
  background-color: #333 !important;
}

.ant-picker-cell-selected .ant-picker-cell-inner,
.ant-picker-cell-range-end .ant-picker-cell-inner,
.ant-picker-cell-range-start .ant-picker-cell-inner {
  background-color: #00da3c !important;
}

/* 按钮样式 */
.ant-btn-primary {
  background-color: #00da3c !important;
  border-color: #00da3c !important;
}

.ant-btn-primary:hover {
  background-color: #00b332 !important;
  border-color: #00b332 !important;
}

/* 统计组件 */
.ant-statistic-title {
  color: #999 !important;
}

.ant-statistic-content {
  color: #fff !important;
}

/* 进度条 */
.ant-progress-text {
  color: #fff !important;
}

/* Sider 样式 */
.ant-layout-sider {
  background: #1a1a1a !important;
}

.ant-layout-sider-trigger {
  background: #2a2a2a !important;
  color: #fff !important;
}

.ant-layout-sider-trigger:hover {
  background: #333 !important;
}

/* 模态框样式 */
.ant-modal-content {
  background-color: #1a1a1a !important;
  color: #fff !important;
}

.ant-modal-header {
  background-color: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
}

.ant-modal-title {
  color: #fff !important;
}

.ant-modal-close {
  color: #fff !important;
}

.ant-modal-body {
  background-color: #1a1a1a !important;
  color: #fff !important;
}

.ant-modal-footer {
  background-color: #1a1a1a !important;
  border-top: 1px solid #333 !important;
}

/* 消息提示样式 */
.ant-message-notice-content {
  background-color: #1a1a1a !important;
  color: #fff !important;
  border: 1px solid #333 !important;
}

/* Spin 加载样式 */
.ant-spin-dot-item {
  background-color: #00da3c !important;
}

/* 自定义股票风格类 */
.stock-up {
  color: #00da3c !important;
}

.stock-down {
  color: #ec0000 !important;
}

.stock-panel {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%) !important;
  border: 1px solid #333 !important;
  border-radius: 4px;
  padding: 16px;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .ant-layout-sider {
    width: 280px !important;
  }
  
  .ant-card {
    margin-bottom: 8px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* K线图容器样式 */
.kline-chart-container {
  background: #0a0e1b;
  border-radius: 4px;
  overflow: hidden;
}

/* Tabs 组件样式 */
.ant-tabs {
  background: #1a1a1a !important;
}

.ant-tabs-tab {
  color: #999 !important;
  border-color: transparent !important;
}

.ant-tabs-tab:hover {
  color: #00da3c !important;
}

.ant-tabs-tab-active {
  color: #00da3c !important;
  background: #2a2a2a !important;
  border-color: #333 !important;
}

.ant-tabs-ink-bar {
  background: #00da3c !important;
}

.ant-tabs-content-holder {
  background: #0a0e1b !important;
}

.ant-tabs-tabpane {
  background: #0a0e1b !important;
}

.ant-tabs-nav {
  background: #1a1a1a !important;
  border-bottom: 1px solid #333 !important;
}

/* 专业股票软件风格增强 */
body {
  background: linear-gradient(135deg, #0a0e1b 0%, #16213e 50%, #0f0f23 100%) !important;
  font-family: 'SF Mono', 'Monaco', 'Consolas', 'Roboto Mono', monospace !important;
}

/* K线图容器增强 */
.kline-container {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #2d4a6b;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border-radius: 6px;
}

/* 数据面板发光效果 */
.data-panel {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid #2d4a6b;
  box-shadow: 
    0 0 20px rgba(0, 218, 60, 0.1),
    0 4px 20px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

/* 实时数据流效果 */
.live-data {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

/* 涨跌颜色增强 */
.bull-color {
  color: #00da3c !important;
  text-shadow: 0 0 8px rgba(0, 218, 60, 0.5);
}

.bear-color {
  color: #ec0000 !important;
  text-shadow: 0 0 8px rgba(236, 0, 0, 0.5);
}

/* MA均线标签 */
.ma-legend {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid #2d4a6b;
  border-radius: 4px;
  font-size: 11px;
  backdrop-filter: blur(5px);
}

.ma-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ma-color-dot {
  width: 8px;
  height: 2px;
  border-radius: 1px;
}

/* 指标面板动画 */
.indicator-card {
  transition: all 0.3s ease;
  background: rgba(26, 26, 46, 0.95) !important;
  border: 1px solid #2d4a6b !important;
  backdrop-filter: blur(10px);
}

.indicator-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 0 25px rgba(0, 218, 60, 0.15),
    0 8px 25px rgba(0,0,0,0.4);
  border-color: #00da3c !important;
}

/* 指标面板完整样式 */
.indicator-panel {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid #2d4a6b;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #2d4a6b;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
}

.indicators-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.indicator-card {
  background: rgba(15, 15, 35, 0.9);
  border: 1px solid #2d4a6b;
  border-radius: 4px;
  padding: 8px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.indicator-card:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 0 15px rgba(0, 218, 60, 0.15),
    0 4px 15px rgba(0,0,0,0.4);
  border-color: #00da3c;
}

.indicator-icon {
  font-size: 16px;
  margin-bottom: 4px;
  opacity: 0.8;
}

.indicator-title {
  color: #999;
  font-size: 10px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.indicator-value {
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 2px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', 'Roboto Mono', monospace;
}

.indicator-subtitle {
  color: #666;
  font-size: 9px;
  margin-bottom: 4px;
}

.indicator-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: bold;
  flex-wrap: wrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .indicators-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .indicator-card {
    padding: 8px;
  }
  
  .indicator-value {
    font-size: 14px;
  }
  
  .indicator-icon {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .indicators-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

/* 侧边栏指标面板样式 */
.sider .indicator-panel {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid #2d4a6b;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.sider .indicators-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.sider .indicator-card {
  background: rgba(15, 15, 35, 0.9);
  border: 1px solid #2d4a6b;
  border-radius: 4px;
  padding: 4px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.sider .indicator-card:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 0 12px rgba(0, 218, 60, 0.15),
    0 3px 12px rgba(0,0,0,0.4);
  border-color: #00da3c;
}

.sider .indicator-icon {
  font-size: 12px;
  margin-bottom: 2px;
  opacity: 0.8;
}

.sider .indicator-title {
  color: #999;
  font-size: 8px;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  font-weight: 500;
}

.sider .indicator-value {
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 1px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', 'Roboto Mono', monospace;
}

.sider .indicator-subtitle {
  color: #666;
  font-size: 7px;
  margin-bottom: 2px;
}

.sider .indicator-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 8px;
  font-weight: bold;
  flex-wrap: wrap;
}

/* 压缩体重输入组件的间距 */
.sider .weight-input-section {
  margin-bottom: 8px;
}

.sider .weight-input-section .ant-form-item {
  margin-bottom: 6px;
}

.sider .weight-input-section .ant-input,
.sider .weight-input-section .ant-select-selector,
.sider .weight-input-section .ant-picker {
  height: 28px;
  font-size: 11px;
}

.sider .weight-input-section .ant-btn {
  height: 32px;
  font-size: 12px;
  margin-top: 6px;
}

.sider .weight-input-section .ant-form-item-label > label {
  font-size: 10px;
  margin-bottom: 2px;
}

.sider .weight-input-section .ant-input-group-addon {
  font-size: 10px;
  padding: 0 6px;
}

.sider .weight-input-section .ant-form-item-explain {
  font-size: 9px;
  margin-top: 1px;
}

.sider .weight-input-section .kline-hint {
  font-size: 9px;
  color: #666;
  margin-top: 4px;
  line-height: 1.2;
}

/* 进一步压缩指标面板 */
.sider .indicator-panel {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid #2d4a6b;
  border-radius: 6px;
  padding: 6px;
  margin-bottom: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.sider .indicators-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.sider .indicator-card {
  background: rgba(15, 15, 35, 0.9);
  border: 1px solid #2d4a6b;
  border-radius: 3px;
  padding: 3px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.sider .indicator-card:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 0 12px rgba(0, 218, 60, 0.15),
    0 3px 12px rgba(0,0,0,0.4);
  border-color: #00da3c;
}

.sider .indicator-icon {
  font-size: 10px;
  margin-bottom: 1px;
  opacity: 0.8;
}

.sider .indicator-title {
  color: #999;
  font-size: 7px;
  margin-bottom: 1px;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  font-weight: 500;
}

.sider .indicator-value {
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  margin-bottom: 1px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', 'Roboto Mono', monospace;
}

.sider .indicator-subtitle {
  color: #666;
  font-size: 6px;
  margin-bottom: 1px;
}

.sider .indicator-change {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 7px;
  font-weight: bold;
  flex-wrap: wrap;
}

/* 改善输入框占位符文字的可见性 */
.sider .weight-input-section .ant-input-number-input::placeholder,
.sider .weight-input-section .ant-select-selection-placeholder,
.sider .weight-input-section .ant-picker-input > input::placeholder,
.sider .weight-input-section .ant-input::placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

.sider .weight-input-section .ant-input-number-input::-webkit-input-placeholder,
.sider .weight-input-section .ant-select-selection-placeholder::-webkit-input-placeholder,
.sider .weight-input-section .ant-picker-input > input::-webkit-input-placeholder,
.sider .weight-input-section .ant-input::-webkit-input-placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

.sider .weight-input-section .ant-input-number-input::-moz-placeholder,
.sider .weight-input-section .ant-select-selection-placeholder::-moz-placeholder,
.sider .weight-input-section .ant-picker-input > input::-moz-placeholder,
.sider .weight-input-section .ant-input::-moz-placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

/* 确保K线图能够充分利用可用空间 */
.ant-layout-content {
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ant-layout-content .ant-tabs {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ant-layout-content .ant-tabs-content-holder {
  width: 100%;
  height: 100%;
  flex: 1;
}

.ant-layout-content .ant-tabs-tabpane {
  width: 100%;
  height: 100%;
  flex: 1;
}

.ant-layout-content .ant-tabs-tabpane > div {
  width: 100%;
  height: 100%;
  flex: 1;
}

/* K线图容器样式 */
.kline-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.kline-container .ant-spin-nested-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kline-container .ant-spin-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 当侧边栏收起时，主内容区应该扩展 */
.ant-layout-sider-collapsed + .ant-layout .ant-layout-content {
  margin-left: 0;
  width: 100%;
  flex: 1;
}

/* 确保图表容器能够响应式扩展 */
.ant-layout-content .echarts-for-react {
  width: 100% !important;
  height: 100% !important;
}

/* 强制主内容区占满剩余空间 */
.ant-layout .ant-layout-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* 确保Row和Col能够正确扩展 */
.ant-layout-content .ant-row {
  width: 100% !important;
  margin: 0 !important;
  flex: 1;
}

.ant-layout-content .ant-col {
  width: 100% !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}
